let form = document.querySelector("form");
let btn = document.querySelector(".btn");
let username = document.querySelector("#username")
let password = document.querySelector("#password")

btn.onclick = function () {

    pAjax({
        url: '../api/zhuce.php',
        type: 'post',
        data: {
            username: username.value,
            password: password.value,
        },

    }).then(res => {
        alert(res);
        if (res) {
            location.href = "../html/login.html"
        }
    })
}